package top.zhangjianyong.tools.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import top.zhangjianyong.tools.config.json.LongToStringSerializer;

import java.time.LocalDateTime;

/**
 * @author ： zhangjianyong
 * @date ： 2021/11/1 14:17
 */
@Data
public abstract class BaseEntity {

    @JSONField(serializeUsing = LongToStringSerializer.class)
    private Long id;

    @JSONField(serializeUsing = LongToStringSerializer.class)
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @JSONField(serializeUsing = LongToStringSerializer.class)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField(fill = FieldFill.INSERT)
    private Integer delFlag;


}
